﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using SharedLibraries.Constants;
using ThangNM_LIB.FUNC;

namespace SharedLibraries
{
    public class GetTextConstants
    {
        /// <summary> ExtendFile_GTC (Loại định dạng file) </summary>
        /// <param name="input"></param>
        /// <returns>output</returns>
        public static Int16 ExtendFile_GTC(String input)
        {
            Int16 output = 0;
            switch (StringEx.Trim(input).ToUpper())
            {
                case ".FLV": output = ExtendFile_C.FLV; break;
                case ".MP4": output = ExtendFile_C.MP4; break;
                case ".OGG": output = ExtendFile_C.OGG; break;
                case ".WEBM": output = ExtendFile_C.WEBM; break;
                case ".F4V": output = ExtendFile_C.F4V; break;
                case ".MKV": output = ExtendFile_C.MKV; break;
                case ".AVI": output = ExtendFile_C.AVI; break;
                case ".3G2": output = ExtendFile_C._3G2; break;
                case ".MOV": output = ExtendFile_C.MOV; break;
                case ".MPG": output = ExtendFile_C.MPG; break;
                case ".WMV": output = ExtendFile_C.WMV; break;
                case ".JPG": output = ExtendFile_C.JPG; break;
                case ".PNG": output = ExtendFile_C.PNG; break;
                case ".GIF": output = ExtendFile_C.GIF; break;
                case ".SWF": output = ExtendFile_C.SWF; break;



            }
            return output;
        }

        /// <summary> .WMVChangeFreq_GTC (Tần số thay đổi) </summary>
        /// <param name="input"></param>
        /// <returns>output</returns>
        public static string ChangeFreq_GTC(String input)
        {
            string output = "";
            switch (input)
            {
                case "always": output = "always"; break;
                case "hourly": output = "hourly"; break;
                case "daily": output = "daily"; break;
                case "weekly": output = "weekly"; break;
                case "monthly": output = "monthly"; break;
                case "yearly": output = "yearly"; break;
                case "never": output = "never"; break;
                default: output = "N/A"; break;
            }
            return output;
        }

        /// <summary> Sitemap_Type_GTC </summary>
        /// <param name="input"></param>
        /// <returns>output</returns>
        public static string Sitemap_Type_GTC(Int16 input)
        {
            string output = "";
            switch (input)
            {
                case ConstEx.TableID_C.Category: output = "Danh mục"; break;
                case ConstEx.TableID_C.Topic: output = "Bài viết"; break;
                case ConstEx.TableID_C.Media: output = "Giải trí"; break;
                case ConstEx.TableID_C.QuestionAnswer: output = "Hỏi đáp"; break;
                case ConstEx.TableID_C.Account: output = "Tác giả"; break;
                case ConstEx.TableID_C.File: output = "Chia sẻ file"; break;
                default: output = "N/A"; break;
            }
            return output;
        }

        /// <summary> Media_iType_GTC (Nhóm giải trí) </summary>
        /// <param name="input"></param>
        /// <returns>output</returns>
        public static string Media_iType_GTC(Int16 input)
        {
            string output = "";
            switch (input)
            {
                case Media_iType_C.Choi_Game: output = "Chơi game"; break;
                case Media_iType_C.Tai_Game: output = "Tải game"; break;
                case Media_iType_C.Xem_Phim_TV_Online: output = "Xem phim tv online"; break;
                case Media_iType_C.Nghe_Nhac_Radio: output = "Nghe nhạc radio"; break;
                case Media_iType_C.Sach_Truyen: output = "Sách - Truyện"; break;
                case Media_iType_C.Hinh_Anh_Dong: output = "Hình ảnh động"; break;
                case Media_iType_C.Doc_Va_La: output = "Độc và lạ"; break;
                case Media_iType_C.Ung_Dung: output = "Ứng dụng"; break;
                default: output = "N/A"; break;
            }
            return output;
        }

        /// <summary> Media_sType_GTC (Nhóm giải trí) </summary>
        /// <param name="input"></param>
        /// <returns>output</returns>
        public static Int16 Media_sType2iType_GTC(string input)
        {
            Int16 output = 0;
            switch (StringEx.Trim(input).ToLower())
            {
                case Media_sType_C.Choi_Game: output = Media_iType_C.Choi_Game; break;
                case Media_sType_C.Tai_Game: output = Media_iType_C.Tai_Game; break;
                case Media_sType_C.Xem_Phim_TV_Online: output = Media_iType_C.Xem_Phim_TV_Online; break;
                case Media_sType_C.Nghe_Nhac_Radio: output = Media_iType_C.Nghe_Nhac_Radio; break;
                case Media_sType_C.Sach_Truyen: output = Media_iType_C.Sach_Truyen; break;
                case Media_sType_C.Hinh_Anh_Dong: output = Media_iType_C.Hinh_Anh_Dong; break;
                case Media_sType_C.Doc_Va_La: output = Media_iType_C.Doc_Va_La; break;
                default: output = 99; break;
            }
            return output;
        }

        /// <summary> Media_sType_GTC (Nhóm giải trí) </summary>
        /// <param name="input"></param>
        /// <returns>output</returns>
        public static string Media_iType2sType_GTC(Int16 input)
        {
            string output = "";
            switch (input)
            {
                case Media_iType_C.Choi_Game: output = Media_sType_C.Choi_Game; break;
                case Media_iType_C.Tai_Game: output = Media_sType_C.Tai_Game; break;
                case Media_iType_C.Xem_Phim_TV_Online: output = Media_sType_C.Xem_Phim_TV_Online; break;
                case Media_iType_C.Nghe_Nhac_Radio: output = Media_sType_C.Nghe_Nhac_Radio; break;
                case Media_iType_C.Sach_Truyen: output = Media_sType_C.Sach_Truyen; break;
                case Media_iType_C.Hinh_Anh_Dong: output = Media_sType_C.Hinh_Anh_Dong; break;
                case Media_iType_C.Doc_Va_La: output = Media_sType_C.Doc_Va_La; break;
                default: output = ""; break;
            }
            return output;
        }

        /// <summary> Topic_iStatus_GTC (Trạng thái bài viết) </summary>
        /// <param name="input"></param>
        /// <returns>output</returns>
        public static string Topic_iStatus_GTC(Int16 input)
        {
            string output = "";
            switch (input)
            {
                case Topic_iStatus_C.Approved: output = "Mở"; break;
                case Topic_iStatus_C.Pending: output = "Chờ xét duyệt"; break;
                case Topic_iStatus_C.Deleted: output = "Khóa"; break;
                default: output = "N/A"; break;
            }
            return output;
        }

        /// <summary> Topic_sCode_Link_GTC (Trạng thái bài viết) </summary>
        /// <param name="input"></param>
        /// <returns>output</returns>
        public static string Topic_sCode_Link_GTC(Int16 input)
        {
            string output = "";
            switch (input)
            {
                case Topic_sCode_C.shCore: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shCore.js"; break;
                case Topic_sCode_C.shBrushA3: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushA3.js"; break;
                case Topic_sCode_C.shBrushBash: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushBash.js"; break;
                case Topic_sCode_C.shBrushColdFusion: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushColdFusion.js"; break;
                case Topic_sCode_C.shBrushCpp: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushCpp.js"; break;
                case Topic_sCode_C.shBrushCSharp: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushCSharp.js"; break;
                case Topic_sCode_C.shBrushCss: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushCss.js"; break;
                case Topic_sCode_C.shBrushDelphi: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushDelphi.js"; break;
                case Topic_sCode_C.shBrushDiff: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushDiff.js"; break;
                case Topic_sCode_C.shBrushErlang: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushErlang.js"; break;
                case Topic_sCode_C.shBrushGroovy: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushGroovy.js"; break;
                case Topic_sCode_C.shBrushJava: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushJava.js"; break;
                case Topic_sCode_C.shBrushJavaFX: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushJavaFX.js"; break;
                case Topic_sCode_C.shBrushJScript: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushJScript.js"; break;
                case Topic_sCode_C.shBrushPerl: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushPerl.js"; break;
                case Topic_sCode_C.shBrushPhp: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushPhp.js"; break;
                case Topic_sCode_C.shBrushPlain: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushPlain.js"; break;
                case Topic_sCode_C.shBrushPowerShell: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushPowerShell.js"; break;
                case Topic_sCode_C.shBrushPython: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushPython.js"; break;
                case Topic_sCode_C.shBrushRuby: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushRuby.js"; break;
                case Topic_sCode_C.shBrushScala: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushScala.js"; break;
                case Topic_sCode_C.shBrushSql: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushSql.js"; break;
                case Topic_sCode_C.shBrushVb: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushVb.js"; break;
                case Topic_sCode_C.shBrushXml: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/scripts/shBrushXml.js"; break;
                case Topic_sCode_C.shCore_css: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/styles/shCoreDefault.css"; break;
                case Topic_sCode_C.shThemeDefault_css: output = "http://nguyenmanhthang.net/ckeditor/plugins/syntaxhighlight/styles/shThemeDefault.css"; break;
            }
            return output;
        }

        /// <summary> Topic_sCode_GTC (Trạng thái bài viết) </summary>
        /// <param name="input"></param>
        /// <returns>output</returns>
        public static string Topic_sCode_GTC(Int16 input)
        {
            string output = "";
            switch (input)
            {
                case Topic_sCode_C.shCore: output = "Core"; break;
                case Topic_sCode_C.shBrushA3: output = "A3"; break;
                case Topic_sCode_C.shBrushBash: output = "Bash"; break;
                case Topic_sCode_C.shBrushColdFusion: output = "ColdFusion"; break;
                case Topic_sCode_C.shBrushCpp: output = "Cpp"; break;
                case Topic_sCode_C.shBrushCSharp: output = "CSharp"; break;
                case Topic_sCode_C.shBrushCss: output = "Css"; break;
                case Topic_sCode_C.shBrushDelphi: output = "Delphi"; break;
                case Topic_sCode_C.shBrushDiff: output = "Diff"; break;
                case Topic_sCode_C.shBrushErlang: output = "Erlang"; break;
                case Topic_sCode_C.shBrushGroovy: output = "Groovy"; break;
                case Topic_sCode_C.shBrushJava: output = "Java"; break;
                case Topic_sCode_C.shBrushJavaFX: output = "JavaFX"; break;
                case Topic_sCode_C.shBrushJScript: output = "JScript"; break;
                case Topic_sCode_C.shBrushPerl: output = "Perl"; break;
                case Topic_sCode_C.shBrushPhp: output = "Php"; break;
                case Topic_sCode_C.shBrushPlain: output = "Plain"; break;
                case Topic_sCode_C.shBrushPowerShell: output = "PowerShell"; break;
                case Topic_sCode_C.shBrushPython: output = "Python"; break;
                case Topic_sCode_C.shBrushRuby: output = "Ruby"; break;
                case Topic_sCode_C.shBrushScala: output = "Scala"; break;
                case Topic_sCode_C.shBrushSql: output = "Sql"; break;
                case Topic_sCode_C.shBrushVb: output = "Vb"; break;
                case Topic_sCode_C.shBrushXml: output = "Xml"; break;
                case Topic_sCode_C.shCore_css: output = "Core.css"; break;
                case Topic_sCode_C.shThemeDefault_css: output = "ThemeDefault.css"; break;
            }
            return output;
        }

        /// <summary> Account_iPermission_GTC (Quyền Hạn Tài Khoản) </summary>
        /// <param name="input"></param>
        /// <returns>output</returns>
        public static string Account_iPermission_GTC(Int16 input)
        {
            string output = "";
            switch (input)
            {
                case Account_iPermission_C.Administrator: output = "Quản trị"; break;
                case Account_iPermission_C.Editor: output = "Biên tập"; break;
                case Account_iPermission_C.Followers: output = "Theo dõi"; break;
                case Account_iPermission_C.Visistor: output = "Khách"; break;
                case Account_iPermission_C.Anonymous: output = "Ẩn danh"; break;
                default: output = "N/A"; break;
            }
            return output;
        }

        /// <summary> File_iType_GTC (Loại File) </summary>
        /// <param name="input"></param>
        /// <returns>output</returns>
        public static string File_iType_GTC(Int16 input)
        {
            string output = "";
            switch (input)
            {
                case 1: output = "Video"; break;
                case 2: output = "Tài liệu Pdf"; break;
                case 3: output = "Phần mềm"; break;
                case 4: output = "Loại khác"; break;
                default: output = "N/A"; break;
            }
            return output;
        }

        public static string QuestionAnswer_iType_GTC(Int16 input)
        {
            string output = "";
            switch (input)
            {
                case 1: output = "Số câu trả lời"; break;
                case 2: output = "Số câu hỏi"; break;
            }
            return output;
        }

        public static string Category_iType_GTC(Int16 input)
        {
            string output = "";
            switch (input)
            {
                case ConstEx.TableID_C.Category: output = "Danh mục"; break;
                case ConstEx.TableID_C.Topic: output = "Bài viết"; break;
                case ConstEx.TableID_C.Media: output = "Giải trí"; break;
                case ConstEx.TableID_C.Answer: output = "Hỏi đáp"; break;
                case ConstEx.TableID_C.Account: output = "Tài khoản"; break;
                case ConstEx.TableID_C.File: output = "Chia sẻ file"; break;
                case ConstEx.TableID_C.Quiz: output = "Thi trắc nghiệm"; break;
                case ConstEx.TableID_C.Other: output = "Loại khác"; break;
                default: output = "N/A"; break;
            }
            return output;
        }

        public static string File_iServer_GTC(Int16 input)
        {
            string output = "";
            switch (input)
            {
                case File_iServer_C.Google_Code: output = "Google Code"; break;
                case File_iServer_C.Google_Driver: output = "Google Driver"; break;
                case File_iServer_C.Dropbox: output = "Dropbox"; break;
                case File_iServer_C.Box: output = "Box"; break;
                case File_iServer_C.One_Driver: output = "One Driver"; break;
                case File_iServer_C.Media_Fire: output = "MediaFire"; break;
                default: output = "N/A"; break;
            }
            return output;
        }
    }
}